home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / program / gcc / libmat.lha / src / mconst2.cc < prev    next >
C/C++ Source or Header  |  1980-01-01  |  322b  |  23 lines

  1. //                MATRIX LIB
  2. //            TOMMY JOHANSSON 1995
  3.  
  4. #include "matrix.h"
  5. Matrix::Matrix(int x,int y)
  6. {
  7.     int i,j;
  8.     #ifdef DEBUG
  9.     printf("Initierar %dx%d nollmatris.\n",x,y);
  10.     #endif
  11.     koff=alloc(x+1,y+1);
  12.     if(koff==NULL)
  13.     {
  14.         puts("Minnet slut");
  15.         exit(0);
  16.     }
  17.     m=x;
  18.     n=y;
  19.     for(i=1;i<=x;i++)
  20.         for(j=1;j<=y;j++)
  21.             koff[i][j]=0.0;
  22. }
  23.